<%= form_for(@candidate) do |f| %>
  <% if @candidate.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@candidate.errors.count, "error") %> prohibited this candidate from being saved:</h2>

      <ul>
      <% @candidate.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :org_id %><br />
    <%#= f.number_field :org_id %>
    <%= collection_select(:candidate, :org_id, Org.all, :id, :fullname) %>
  </div>
  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :sex %><br />
    <%= select_tag(:city_id, options_for_select([['男','男'],['女','女']])) %>
    <%#= f.text_field :sex %>
  </div>
  <div class="field">
    <%= f.label :photo %><br />
    <%= f.text_field :photo %>
  </div>
  <div class="field">
    <%= f.label :birthday %><br />
    <%= f.datetime_select :birthday %>
  </div>
  <div class="field">
    <%= f.label :startwork_day %><br />
    <%= f.datetime_select :startwork_day %>
  </div>
  <div class="field">
    <%= f.label :last_edu %><br />
    <%= f.text_field :last_edu %>
  </div>
  <div class="field">
    <%= f.label :last_edu_day %><br />
    <%= f.datetime_select :last_edu_day %>
  </div>
  <div class="field">
    <%= f.label :last_degree %><br />
    <%= f.text_field :last_degree %>
  </div>
  <div class="field">
    <%= f.label :last_degree_day %><br />
    <%= f.datetime_select :last_degree_day %>
  </div>
  <div class="field">
    <%= f.label :study_subject %><br />
    <%= f.text_field :study_subject %>
  </div>
  <div class="field">
    <%= f.label :now_job %><br />
    <%= f.text_field :now_job %>
  </div>
  <div class="field">
    <%= f.label :now_job_day %><br />
    <%= f.datetime_select :now_job_day %>
  </div>
  <div class="field">
    <%= f.label :will_job %><br />
    <%= f.text_field :will_job %>
  </div>
  <div class="field">
    <%= f.label :typenote %><br />
    <%= f.text_field :typenote %>
  </div>
  <div class="field">
    <%= f.label :note %><br />
    <%= f.text_area :note %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
